body {
    background: #f6f6f6;
}

.container {
    padding-top: 20px;
    text-align: center;
}

.wrap {
    position: relative;
    display: inline-block;
    width: 250px;
    height: 300px;
    margin: 0 25px 25px 0;
    -webkit-perspective: 500px;
    -moz-perspective: 500px;
    -ms-perspective: 500px;
    perspective: 500px;
}

.wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 250px;
    height: 300px;
    -webkit-transition: all ease-in-out 1s;
    -moz-transition: all ease-in-out 1s;
    -ms-transition: all ease-in-out 1s;
    transition: all ease-in-out 1s;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -ms-backface-cisibility: hidden;
    backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    -moz-transform-style: preserve-3d;
    -ms-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.positive {
    z-index: 2;
}

.opposite {
    z-index: 1;
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    -ms-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.wrap:hover .positive {
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    -ms-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.wrap:hover .opposite {
    -webkit-transform: rotateY(360deg);
    -moz-transform: rotateY(360deg);
    -ms-transform: rotateY(360deg);
    transform: rotateY(360deg);
}